home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / CIncludes / Appearance.h < prev    next >
C/C++ Source or Header  |  1996-05-01  |  6KB  |  197 lines

  1. /*
  2.      File:        Appearance.h
  3.  
  4.      Contains:    Appearance Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 8
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __APPEARANCE__
  19. #define __APPEARANCE__
  20.  
  21. #ifndef __QUICKDRAW__
  22. #include <Quickdraw.h>
  23. #endif
  24. #ifndef __TYPES__
  25. #include <Types.h>
  26. #endif
  27.  
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31.  
  32. #if PRAGMA_IMPORT_SUPPORTED
  33. #pragma import on
  34. #endif
  35.  
  36. #if PRAGMA_ALIGN_SUPPORTED
  37. #pragma options align=mac68k
  38. #endif
  39.  
  40. #if FOR_SYSTEM8_COOPERATIVE
  41. /* Appearance Manager Error Codes (will move to Errors.i) -4200 through -4249 */
  42.  
  43. enum {
  44.     appearanceBadPatternIndexErr = -4201                        /* pattern index invalid */
  45. };
  46.  
  47. /*
  48.  * System Pattern (PixPat) Indices for GetThemePixPat and SetThemePen
  49. */
  50.  
  51. enum {
  52.     kThemeGrowIconBorderPattern    = 1,                            /* Windows */
  53.     kThemeRootMenuBackgroundPattern = 2,                        /* Menus */
  54.     kThemeSelectedRootMenuBackgroundPattern = 3,
  55.     kThemeDisabledRootMenuBackgroundPattern = 4,
  56.     kThemeMenuBackgroundPattern    = 5,
  57.     kThemeSelectedMenuBackgroundPattern = 6,
  58.     kThemeDisabledMenuBackgroundPattern = 7,
  59.     kThemeActivePushButtonBackgroundPattern = 8,                /* Controls */
  60.     kThemePressedPushButtonBackgroundPattern = 9,
  61.     kThemeInactivePushButtonBackgroundPattern = 10,
  62.     kThemeActiveOffIconButtonBackgroundPattern = 11,
  63.     kThemeActiveOnIconButtonBackgroundPattern = 12,
  64.     kThemePressedOffIconButtonBackgroundPattern = 13,
  65.     kThemePressedOnIconButtonBackgroundPattern = 14,
  66.     kThemeMixedIconButtonBackgroundPattern = 15,
  67.     kThemeInactiveIconButtonBackgroundPattern = 16,
  68.     kThemeActivePopupButtonBackgroundPattern = 17,
  69.     kThemePressedPopupButtonBackgroundPattern = 18,
  70.     kThemeInactivePopupButtonBackgroundPattern = 19,
  71.     kThemeActiveDialogBackgroundPattern = 20,                    /* Dialogs */
  72.     kThemeInactiveDialogBackgroundPattern = 21,
  73.     kThemeActiveAlertBackgroundPattern = 22,
  74.     kThemeInactiveAlertBackgroundPattern = 23,
  75.     kThemeActiveModelessDialogBackgroundPattern = 24,
  76.     kThemeInactiveModelessDialogBackgroundPattern = 25,
  77.     kThemeObjectFocusPattern    = 26,
  78.     kThemeActiveWindowHeaderBackgroundPattern = 27,                /* Primitives */
  79.     kThemeInactiveWindowHeaderBackgroundPattern = 28,
  80.     kThemeFinderListViewSortColumnPattern = 29,                    /* Finder */
  81.     kThemeFinderListViewBackgroundPattern = 30,
  82.     kThemeFinderListViewSeparatorLinePattern = 31,
  83.     kThemeFinderWindowBackgroundPattern = 32,
  84.     kThemeUtilityWindowBackgroundPattern = 33,                    /* Miscellaneous */
  85.     kThemeStatusBarBackgroundPattern = 34,
  86.     kThemeInactiveStatusBarBackgroundPattern = 35,
  87.     kThemeDragHilitePattern        = 36                            /* Drag Mgr */
  88. };
  89.  
  90. /*
  91.  * System Text and other RGBColor Indices for GetThemeColor and SetThemeFore/BackColor.
  92. */
  93.  
  94. enum {
  95.     kThemeActiveDocumentWindowTitleColor = 1,                    /* Windows */
  96.     kThemeInactiveDocumentWindowTitleColor = 2,
  97.     kThemeActiveMovableModalWindowTitleColor = 3,
  98.     kThemeInactiveMovableModalWindowTitleColor = 4,
  99.     kThemeActiveFloatingWindowTitleColor = 5,
  100.     kThemeInactiveFloatingWindowTitleColor = 6,
  101.     kThemeActiveDrawerWindowTitleColor = 7,
  102.     kThemeInactiveDrawerWindowTitleColor = 8,
  103.     kThemeRootMenuTextColor        = 9,                            /* Menus */
  104.     kThemeSelectedRootMenuTextColor = 10,
  105.     kThemeDisabledRootMenuTextColor = 11,
  106.     kThemeMenuTextColor            = 12,
  107.     kThemeSelectedMenuTextColor    = 13,
  108.     kThemeDisabledMenuTextColor    = 14,
  109.     kThemeActivePushButtonTextColor = 15,                        /* Controls */
  110.     kThemePressedPushButtonTextColor = 16,
  111.     kThemeInactivePushButtonTextColor = 17,
  112.     kThemeActivePopupLabelTextColor = 18,
  113.     kThemeInactivePopupLabelTextColor = 19,
  114.     kThemeActivePopupArrowColor    = 20,
  115.     kThemePressedPopupArrowColor = 21,
  116.     kThemeInactivePopupArrowColor = 22,
  117.     kThemeActiveDialogTextColor    = 23,                            /* Dialogs */
  118.     kThemeInactiveDialogTextColor = 24,
  119.     kThemeActiveAlertTextColor    = 25,
  120.     kThemeInactiveAlertTextColor = 26,
  121.     kThemeActiveModelessDialogTextColor = 27,
  122.     kThemeInactiveModelessDialogTextColor = 28,
  123.     kThemeActiveWindowHeaderTextColor = 29,                        /* Primitives */
  124.     kThemeInactiveWindowHeaderTextColor = 30,
  125.     kThemeIconLabelTextColor    = 31,                            /* Finder */
  126.     kThemeIconLabelBackgroundColor = 32,
  127.     kThemeFinderListViewTextColor = 33,
  128.     kThemeAppleGuideCoachmarkColor = 34,                        /* Miscellaneous */
  129.     kThemeChasingArrowsColor    = 35,
  130.     kThemeStatusBarTextColor    = 36,
  131.     kThemeInactiveStatusBarTextColor = 37
  132. };
  133.  
  134. /*
  135.  *    System Appearance Information
  136. */
  137. /*
  138.  System Patterns
  139.  *
  140.  * WARNING: Patterns returned by GetThemePixPat are shared by the system and other
  141.  * running applications.  These patterns are updated by the system automatically
  142.  * whenever the theme changes.  They are system-owned and must not be disposed.
  143.  * Never dispose a PixPatHandle obtained from GetThemePixPat or the system will crash.
  144. */
  145. extern pascal OSStatus GetThemePixPat(SInt16 patternIndex, PixPatHandle *pixPat);
  146.  
  147. extern pascal OSStatus SetThemePen(SInt16 patternIndex);
  148.  
  149. /* System colors */
  150. extern pascal OSStatus SetThemeForeColor(SInt16 foreColorIndex);
  151.  
  152. extern pascal OSStatus SetThemeBackColor(SInt16 backColorIndex);
  153.  
  154. extern pascal OSStatus GetThemeColor(SInt16 colorIndex, RGBColor *color);
  155.  
  156. /*
  157.  *    Appearance Drawing Primitives
  158. */
  159. extern pascal OSStatus DrawThemePrimaryGroup(const Rect *rect, Boolean isActive);
  160.  
  161. extern pascal OSStatus DrawThemeSecondaryGroup(const Rect *rect, Boolean isActive);
  162.  
  163. extern pascal OSStatus DrawThemeSeparator(const Rect *rect, Boolean isActive);
  164.  
  165. extern pascal OSStatus DrawThemeWindowHeader(const Rect *rect, Boolean isActive);
  166.  
  167. extern pascal OSStatus DrawThemePlacard(const Rect *rect, Boolean isActive);
  168.  
  169. extern pascal OSStatus DrawThemeDialogFrame(const Rect *rect, Boolean isActive);
  170.  
  171. extern pascal OSStatus DrawThemeTextBoxFrame(const Rect *textBoxRect, Boolean isActive);
  172.  
  173. extern pascal OSStatus DrawThemeTextBoxFocus(const Rect *textBoxRect, Boolean hasFocus);
  174.  
  175. extern pascal OSStatus DrawThemeListBoxFrame(const Rect *listBoxRect, Boolean isActive);
  176.  
  177. extern pascal OSStatus DrawThemeListBoxFocus(const Rect *listBoxRect, Boolean hasFocus);
  178.  
  179. extern pascal OSStatus DrawThemeGenericFocus(const Rect *focusRect, Boolean hasFocus);
  180.  
  181. #endif
  182.  
  183. #if PRAGMA_ALIGN_SUPPORTED
  184. #pragma options align=reset
  185. #endif
  186.  
  187. #if PRAGMA_IMPORT_SUPPORTED
  188. #pragma import off
  189. #endif
  190.  
  191. #ifdef __cplusplus
  192. }
  193. #endif
  194.  
  195. #endif /* __APPEARANCE__ */
  196.  
  197.